<template>
  <AuditShowPage
    :formData="formData"
    :formItems="formItems"
  >
    <h3 slot="page-header">计量单位审核记录-查看</h3>
  </AuditShowPage>
</template>
<script>
import AuditShowPage from '@/components/AuditShowPage';
import { baseGetByUuidService } from '@/api/basics/unitManage/unitToAudit';
export default {
  components: {
    AuditShowPage
  },
  data () {
    return {
      formData: {},
      formItems: [
        {
          prop: 'unitName',
          label: '计量单位名称'
        },
        {
          prop: 'unitGroupName',
          label: '计量单位组'
        },
        {
          prop: 'decimalPlaces',
          label: '默认小数位'
        },
        {
          prop: 'note',
          label: '备注'
        },
      ],
    }
  },
  mounted () {
    this.getPageDetails(this.$route.query?.uuid)
  },
  methods: {
    async getPageDetails (uuid) {
      const data = { uuid }
      const res = await baseGetByUuidService(data, '.page-body')
      if (res?.retData) {
        this.formData = res.retData
      }
    },
  }
}
</script>
